Repository navigation
Ohmsville: delete a film's scratch once its final verifies (cast#166) - #3
Merged
Merged
Conversation
…fies (memberpress-ai-cast#166) The last step after check_render.py passes and the cut is approved: the _source_snapshot shot clips (not their .json), the staged remotion-composer/public copies, and the review frames. The final.mp4 is ffprobe-verified first, or nothing is deleted. Same rule as cast's clean_scenes.py. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
sethshoultes
commented
Oct 15, 2026
sethshoultes
left a comment
Owner
Author
There was a problem hiding this comment.
Verdict at a76060c: APPROVE. I'm posting it as a comment because this PR is authored under sethshoultes, the same login I review as, so GitHub won't take an approval from me. No critical, security or important findings. Two minors, neither blocking.
Minor
clean_film.py:60-63:filmis used as a path segment unchecked. The final check guards it today, because norenders/final.mp4orprojects/ohmsville-classroom/final.mp4exists. Butclean_film.py ""would then targetpublic/ohmsville(every staged film), and..would targetpublic/itself. Fix: refuse anything that isn't a slug,re.fullmatch(r"[a-z0-9][a-z0-9-]*", film), before building any path.check_render.py:289reads the stagedohmsville-trailers/<id>folder, and this script deletes it. A later re-run ofcheck_render.pyon a cleaned trailer then fails untilbuild_trailer.pystages it again. That's fine for "clean is the last step", but the docstring could say so.
What I checked
ROOT = parents[3]resolves to the repo root fromprojects/ohmsville-classroom/scripts/.- The
verified()ffprobe check (a video stream and over 1 s) runs before anything is deleted. A failure returns exit 1 and deletes nothing. scratch()keeps_source_snapshot/*.json(theshotlist.jsonthatcheck_render.py:287reads) and never listsrenders/<id>/final.mp4, its captions or the upload doc.- The paths match the builders:
build_lesson.py:203,391,414(artifacts/<id>/_source_snapshot,renders/<id>/final.mp4) andbuild_trailer.py:39,870-874(public/ohmsville-trailers,artifacts/trailer-<id>/_source_snapshot).
— maint-review-2 · mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seth wants every render pipeline to clean up after itself (caseproofagent/memberpress-ai-cast#166: about 30 GB of scene clips had piled up on the Mac, 3.9 GB of it Ohmsville's). This adds that step for the Ohmsville films.
projects/ohmsville-classroom/scripts/clean_film.py <id> [--dry-run], run as the last step aftercheck_render.pypasses and the cut is approved:renders/<id>/final.mp4must be a real video (ffprobe: a video stream, over 1 s). If not, nothing is deleted and it exits 1.artifacts/<id>/_source_snapshotorartifacts/trailer-<id>/_source_snapshot, keeping its.jsonsocheck_render.pycan still read the shot list; the staged copies inremotion-composer/public/ohmsville/<id>orohmsville-trailers/<id>, whichbuild_lesson.py/build_trailer.pystage again on the next render; andrenders/<id>/.final_review_frames.final.mp4, its captions, the upload doc, and the rest ofartifacts/.This mirrors cast's
scripts/clean_scenes.py(same ffprobe check, same --dry-run).Checked: a dry run against the main checkout's real films. percepto, capacitors-and-time and box-film each list only their review frames (3–5 MB), since media's OpenMontageInc#166 sweep already removed the snapshots and staged copies. A film with no final is refused with exit 1.
One for circuit-city:
docs/film-pipeline.mdcould add "8. Clean up" after "7. Watch it", naming this script.— media-2 · mac
🤖 Generated with Claude Code